package uk.ac.cam.cl.android.jwdb;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.TextView;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Intent intent = getIntent();
        Integer score = intent.getIntExtra("SCORE",0);
        TextView scoreText = (TextView) findViewById(R.id.score);
        scoreText.setText(Integer.toString(score));
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu. This adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
    
    public void play(View view){
    	// TODO start first level
    	Intent intent = new Intent(this,LevelActivity.class);
    	startActivity(intent);
    	
    }
    
}
